$(function () {
	var frmRefuse = $('#frm-order-refuse');
	$('#order_refuse').click(function() {
		if (confirm('CANCEL_ORDER_QUESTION'.translate())) {
			$(this).hide();
			frmRefuse.slideDown();
		}
	});
	frmRefuse.submit(function() {
		if ($('#frm-order-refuse textarea').val() == '') {
			alert('NOT_DECLARE_REASON'.translate());
			return false;
		}
	});

	$('.insurance').click(function() {
		var $this = $(this);
		var url = $this.next('input[type="hidden"].insurance-url').val();
		var frame = $this.parents('.services').next('.insurance-iframe');
		if (frame.length <= 0) {
			var iframe = '<iframe class="insurance-iframe" src="' + url + '" height="1000" width="100%"></iframe>';
			$this.parents('.services').after(iframe);
		} else {
			if (frame.is(':visible'))
				frame.slideUp();
			else
				frame.slideDown();
		}
	});

});